package com.starblink.brand.widget

import android.content.Context
import androidx.lifecycle.LifecycleOwner
import com.skydoves.balloon.ArrowOrientation
import com.skydoves.balloon.ArrowPositionRules
import com.skydoves.balloon.Balloon
import com.skydoves.balloon.createBalloon
import com.starblink.basic.ext.screenWidth
import com.starblink.basic.util.ActivityStackManage
import com.starblink.brand.R

class BrandAllBalloonFactory : Balloon.Factory() {

    override fun create(context: Context, lifecycle: LifecycleOwner?): Balloon {
        return createBalloon(context) {
            setLayout(R.layout.layout_ballon_brand_all)
            setArrowOrientation(ArrowOrientation.TOP)
            setIsVisibleArrow(false)
            setArrowPositionRules(ArrowPositionRules.ALIGN_BALLOON)
            setArrowPosition(0.2f)
            setArrowWidth(20)
            setArrowHeight(10)
            setCornerRadius(16f)
            setMarginLeft(75)
//            setWidth(screenWidth)
            setBackgroundColorResource(com.starblink.basic.style.R.color.gu_white)
            setDimBehind(0.1f)
            setDismissWhenShowAgain(true)
            setLifecycleOwner(lifecycle)
            build()
        }
    }
}